﻿@model RonYee.Models.MvcPage
@{
    ViewBag.Title = "Index";
    Layout = null;
}

<div class="box_padding" id="content">
    <h3><i class="ui-icons"></i>检索新闻</h3>
    <div class="box_top ui-icons"></div>
    <div class="box_bg">
      <div class="box_padding">
       <div class="border_line">
          @using (Html.BeginForm("Search", "News", FormMethod.Post))
            {
                <table width="100%" border="0" id="MyTable" cellpadding="0" cellspacing="0">
                <tbody>
                <tr>
                    <td  class="tdName">新闻标题</td>
                    <td  class="tdData">
                        <input type="text" id="s_title" name="s_title"/>
                    </td>
                    <td class="tdName">新闻内容</td>
                    <td class="tdData">
                        <input type="text" id="s_cont" name="s_cont"/>
                    </td>
                </tr>
                <tr>
                    <td class="tdName">起始时间</td>
                    <td class="tdData">
                        <input type="text" id="s_time" name="s_time"/>
                    </td>
                    <td class="tdName">结束时间</td>
                    <td class="tdData">
                        <input type="text" id="e_time" name="e_time" />
                    </td>
                </tr>
                <tr>
                    <td class="tdData"></td>
                    <td class="tdData"></td>
                    <td class="tdData"></td>
                    <td class="tdData">
                        <input type="submit" value="查询》" class="Button1 ui-icons" />
                    </td>
                </tr>  
                </tbody>
                </table>
                    
            }
        
       </div>
      </div>
    </div>
    <div class="box_down ui-icons"></div>

    @using (Html.BeginForm("PageIndex", "News", FormMethod.Post))
    { 
    <h3><i class="ui-icons"></i>新闻列表</h3>
    <div class="box_top ui-icons"></div>
    <div class="box_bg"><div class="box_padding">
    <div class="border_line">
        <a href="@Url.Action("Create")"><input type="button" class="Button1 ui-icons" value="创建新闻" /></a>
        <table width="100%" border="0" cellpadding="0" cellspacing="0"><tbody>
        <tr>
            <th class="tdName">
                选择
            </th>
            <th class="tdName">
                标题
            </th>
            <th class="tdName">
                关注次数
            </th>
            <th class="tdName">
                编辑时间
            </th>
            <th class="tdName">
                类型1
            </th>
            <th class="tdName">
                编辑
            </th >
            <th class="tdName">
                详细
            </th>
            <th class="tdName">
                删除
            </th>
        </tr>

        @foreach (RonYee.Models.News item in Model.NewsList)
        {
        <tr>
            <td class="tdData">
                <input type="checkbox"  id="CheckId" value="@item.NewsId" />
            </td>
            <td class="tdData">
                @Html.DisplayFor(modelItem => item.NewsTitle)
            </td>
            <td class="tdData">
                @Html.DisplayFor(modelItem => item.ClickNum)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.AddTime)
            </td>
            <td class="tdData">
                @Html.DisplayFor(modelItem => item.NewsType1)
            </td>
            <td class="tdData">
                @Html.ActionLink("编辑", "Edit", new { id = item.NewsId })
            </td>
            <td class="tdData">
                @Html.ActionLink("详细", "Details", new { id = item.NewsId }) 
            </td>
            <td class="tdData">
                @Html.ActionLink("删除", "Delete", new { id = item.NewsId })
            </td>
        </tr>
        }
        </tbody>
        </table> 
        <center>@Html.Partial("~/Views/Shared/_PageIndex.cshtml", Model)</center> 
    </div>
    </div>
    </div>
    <div class="box_down ui-icons"></div>
    }
</div>
<div class="line_top"></div>
